<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    var kthLargestNumber = function(nums, k) {
    nums = nums.map(item => Number(item));
    nums.sort((a,b) => Number(b - a));
    console.log(nums);
    return String(nums[k - 1]);
    console.log(nums[k - 1]);
};
console.log(kthLargestNumber(["1","2","12","21"],3));
  </script>
</body>
</html>